import java.util.Scanner;

/**
 * Created With IntelliJ IDEA
 * Description:牛客网: 首页 > 试题广场 > 抄送列表
 * <a href="https://www.nowcoder.com/questionTerminal/286af664b17243deb745f69138f8a800">...</a>
 * User: DELL
 * Data: 2023-04-24
 * Time: 13:12
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            //这里注意必须是 nextLine() 因为输入中有空格
            String str = scanner.nextLine();
            String name = scanner.nextLine();
            //标记是否有名字
            boolean flag = false;
            int left = 0;
            for (int i = 0; i < str.length(); i++) {
                int ch = str.charAt(i);
                if (ch == ',') {
                    if (str.substring(left,i).equals(name)) {
                        flag = true;
                        break;
                    } else {
                        left = i+1;
                    }
                } else if (ch == '"') {
                    //处理 "" 内的名字
                    //找到下一个 '"'
                    i++;
                    while (str.charAt(i) != '"') {
                        i++;
                    }
                    if (str.substring(left+1,i).equals(name)) {
                        flag = true;
                        break;
                    } else {
                        left = i+1;
                    }
                } else if (i == str.length()-1) {
                    //处理最后一个名字 这里需要写成 (left,i+1)
                    if (str.substring(left,i+1).equals(name)) {
                        flag = true;
                        break;
                    }
                }
            }
            if (!flag) {
                System.out.println("Important!");
            } else {
                System.out.println("Ignore");
            }
        }
    }
}
